package com.bw.zonghe0719

import android.os.Bundle
import android.widget.Toast
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.navigation.findNavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import com.alibaba.android.arouter.facade.annotation.Route
import com.blankj.utilcode.util.ToastUtils
import com.bw.base.mvvm.BaseActivity
import com.bw.base.mvvm.BaseViewActivity
import com.bw.zonghe0719.databinding.ActivityMainBinding
import com.google.android.material.navigation.NavigationView

@Route(path = "/app/MainActivity")
class MainActivity : BaseViewActivity<ActivityMainBinding>() {
    override fun initView() {
//        //找到fragment
//        val navHostFragment =
//            supportFragmentManager.findFragmentById(R.id.container) as NavHostFragment
//        //找到控制器
//        val navController = navHostFragment.navController
//        //和bottom联动
//        binding.bottom.setupWithNavController(navController)
        binding.bottom.setupWithNavController(findNavController(R.id.container))
    }

    override fun initData() {

    }


    override fun getLayoutId(): Int {
        return R.layout.activity_main
    }
}